package com.css.zfzx.sjcj.modules.hddcB7_VolcanicSvyProjectTable.repository;

import com.css.zfzx.sjcj.modules.hddcB7_VolcanicSvyProjectTable.repository.entity.HddcB7VolcanicsvyprojecttableEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * @author zhangcong
 * @date 2020-11-26
 */
public interface HddcB7VolcanicsvyprojecttableRepository extends JpaRepository<HddcB7VolcanicsvyprojecttableEntity, String> {

    @Query(nativeQuery = true, value = "select * from hddc_b7_volcanicsvyprojecttable where is_valid !=0 and project_name in :projectIds")
    List<HddcB7VolcanicsvyprojecttableEntity> queryHddcB7VolcanicsvyprojecttablesByProjectId(List<String> projectIds);

    @Query(nativeQuery = true, value = "select * from hddc_b7_volcanicsvyprojecttable where is_valid !=0 and task_name in :taskIds")
    List<HddcB7VolcanicsvyprojecttableEntity> queryHddcB7VolcanicsvyprojecttablesByTaskId(List<String> taskIds);
}
